package com.googlecode.sqldatagenerator.parser;

public class TreeGroup extends SyntaxGroup {

    protected TreeGroup parent;

    public TreeGroup(String startToken, String endToken, StringBuilder textBuffer) {
        super(startToken, endToken, textBuffer);
    }
    
    @Override
    public void reset() {
        super.reset();
        parent = null;
    }

    public SyntaxGroup getParent() {
        return parent;
    }
    
    @Override
    public TreeGroup clone() {
        TreeGroup r = (TreeGroup) super.clone();
        r.parent = null;
        return r;
    }

    public TreeGroup newChild() {
        TreeGroup r = clone();
        r.parent = this;
        return r;
    }
}
